package com.scs.application.modules.base.entity;

import com.baomidou.mybatisplus.annotation.TableName;
import com.scs.application.core.entity.DataEntity;
import com.scs.application.modules.upgrade.db.annotation.EntityFieldAnnotation;
import com.scs.application.modules.upgrade.db.enums.EntityFieldType;
import lombok.Data;
import lombok.experimental.Accessors;

import java.util.Date;

/**
 * <p>
 * 资质预警表
 * </p>
 */
@Data
@Accessors(chain = true)
@TableName("base_certificate")
public class Certificate extends DataEntity {


    // id ,在父类中处理

    @EntityFieldAnnotation(
            text = "供应商（生厂商）ID",
            type = EntityFieldType.LONG,
            length = "0.0",
            not_null = true,
            default_value = "",
            comment = ""
    )
    private String targetId;

    @EntityFieldAnnotation(
            text = "供应商（生厂商）名称",
            length = "200.0",
            not_null = false,
            default_value = "",
            comment = ""
    )
    private String targetName;

    @EntityFieldAnnotation(
            text = "资质归属标志 0-供应商 1-厂商",
            length = "0.0",
            not_null = true,
            default_value = "",
            comment = ""
    )
    private Integer targetFlag;

    @EntityFieldAnnotation(
            text = "资质类型",
            length = "0.0",
            not_null = true,
            default_value = "",
            comment = ""
    )
    private Integer certificateType;

    @EntityFieldAnnotation(
            text = "资质编码",
            length = "20.0",
            not_null = true,
            default_value = "",
            comment = ""
    )
    private String certificateCode;

    @EntityFieldAnnotation(
            text = "资质名称",
            length = "30.0",
            not_null = true,
            default_value = "",
            comment = ""
    )
    private String certificateName;

    @EntityFieldAnnotation(
            text = "资质编号",
            length = "30.0",
            not_null = false,
            default_value = "",
            comment = ""
    )
    private String certificateNo;

    @EntityFieldAnnotation(
            text = "效期开始",
            length = "0.0",
            not_null = true,
            default_value = "",
            comment = ""
    )
    private Date expiryStartDate;

    @EntityFieldAnnotation(
            text = "有效期日",
            length = "0.0",
            not_null = true,
            default_value = "",
            comment = ""
    )
    private Date expiryDate;

    @EntityFieldAnnotation(
            text = "资质效期预警天数，默认90天",
            length = "0.0",
            not_null = true,
            default_value = "90",
            comment = ""
    )
    private Integer earlyWarningDays;

    @EntityFieldAnnotation(
            text = "关闭状态。0：正常；1：已关闭（作废）",
            length = "0.0",
            not_null = true,
            default_value = "0",
            comment = ""
    )
    private Boolean closeFlag;


    // creator ,在父类中处理


    // gmt_create ,在父类中处理


    // modifier ,在父类中处理


    // gmt_modified ,在父类中处理

    @EntityFieldAnnotation(
            text = "备注",
            length = "255.0",
            not_null = false,
            default_value = "",
            comment = ""
    )
    private String remark;

}
